﻿using System.Collections.Generic;
using Acaweb.Data.Contracts;
using Acaweb.Model.Entities;
using Acaweb.Componentes.Contracts;
using System.Linq;

namespace Acaweb.Componentes
{
    public class PaisesService : BaseService, IPaisesService
    {
        private IPaisesDao _PaisesDao;

        public IPaisesDao PaisesDao
        {
            get { return _PaisesDao; }
            set { _PaisesDao = value; }
        }

        public IList<Paises> GetAll()
        {
            return PaisesDao.GetAll().OrderBy(t=>t.Nombre).ToList();
        }

        public Paises GetById(int Id)
        {
            return PaisesDao.GetById(Id);
        }
    }
}
